home *** CD-ROM | disk | FTP | other *** search
- ReadArchive "defshaders.vs"
-
- static turb = vnoise(Po)
-
- static octaves = 3
-
- static wood_colors = SpectrumOfColors(
- [0.000, '0.80, 0.67, 0.25', 0.222, '0.80, 0.67, 0.25']
- [0.222, '0.80, 0.67, 0.25', 0.342, '0.60, 0.34, 0.04']
- [0.342, '0.60, 0.34, 0.04', 0.393, '0.80, 0.67, 0.25']
- [0.393, '0.80, 0.67, 0.25', 0.709, '0.80, 0.67, 0.25']
- [0.709, '0.80, 0.67, 0.25', 0.821, '0.53, 0.29, 0.02']
- [0.821, '0.53, 0.29, 0.02', 1.000, '0.80, 0.67, 0.25'])
-
- Declare Woody = (sawtooth(2.0 * sqrt(x*x + y*y) + turb * noise(Po, octaves)) + 1) / 2.0
-
- Declare mywood = Shader [ FunctionalSurface [
- Color wood_colors[Woody]
- IntersectionPointModifier(Po + turb * dnoise(Po, octaves))
- Kd 0.75
- Ks(0.4 + 0.5*pow(Woody,4), '1,1,1')
- Kr 0.05
- GaussianSpecularBRDF 10*(1.0 - Woody) ]
- Scale(0.5, 0.5, 0.5)
- ]
-